#include "cpu/exec/template-start.h"

#define instr movs


//串传送指令movs用于传输内存数据(DS)到另一个内存位置(ES(额外内存段选择))
make_helper(concat(movs_, SUFFIX)) {
	current_sreg = R_DS;//src=DS
	uint32_t src_data = MEM_R(cpu.esi);
	current_sreg = R_ES;//dest=ES
	MEM_W(cpu.edi,src_data);
	cpu.esi += (cpu.eflags.DF ? -DATA_BYTE : DATA_BYTE);
	cpu.edi += (cpu.eflags.DF ? -DATA_BYTE : DATA_BYTE);

	print_asm("movs" str(SUFFIX) " %%ds:(%%esi),%%es:(%%edi)");
	return 1;
}

#include "cpu/exec/template-end.h"
